﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:System.Windows.Controls.Testing"
  xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit">
  <Style
    TargetType="input:TimePicker"
    x:Key="ShouldAllowSettingPopupTemplateFromXaml">
    <Setter
      Property="PopupTemplate">
      <Setter.Value>
        <input:TimePickerPopupTemplate>
          <input:RangeTimePickerPopup />
        </input:TimePickerPopupTemplate>
      </Setter.Value>
    </Setter>
  </Style>   
  
  <Style
    TargetType="input:TimePicker"
    x:Key="ShouldThrowExceptionWhenPopupIsStyledFromXaml">
    <Setter
      Property="Popup">
      <Setter.Value>
          <input:RangeTimePickerPopup />
      </Setter.Value>
    </Setter>
  </Style>   
  
  <Style
    TargetType="input:TimePicker"
    x:Key="ShouldAllowSettingPopupTimeSelectionModeWithPopupTemplate">
    <Setter
      Property="PopupTemplate">
      <Setter.Value>
        <input:TimePickerPopupTemplate>
          <input:RangeTimePickerPopup />
        </input:TimePickerPopupTemplate>
      </Setter.Value>
    </Setter>
  </Style>  
  
  <Style
    TargetType="input:TimePicker"
    x:Key="ShouldAllowSettingPopupTimeSelectionModeWithPopupTemplateB">
    <Setter
      Property="PopupTimeSelectionMode"
      Value="AllowSecondsSelection" />
    <Setter
      Property="PopupTemplate">
      <Setter.Value>
        <input:TimePickerPopupTemplate>
          <input:RangeTimePickerPopup />
        </input:TimePickerPopupTemplate>
      </Setter.Value>
    </Setter>
  </Style>  
  
  <Style
    TargetType="ContentControl"
    x:Key="ShouldAllowSettingPopupTimeSelectionModeWithPopup">
    <Setter
      Property="Template">
      <Setter.Value>
        <ControlTemplate
          TargetType="ContentControl">
          <input:TimePicker PopupTimeSelectionMode="AllowSecondsSelection">
            <input:TimePicker.Popup>
              <input:RangeTimePickerPopup />
            </input:TimePicker.Popup>
          </input:TimePicker>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

</ResourceDictionary>
